<?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?>
<div id="content"><?php echo $content_top; ?>
  <div class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
    <?php } ?>
  </div>
  <h1><?php echo $heading_title; ?></h1>
  
  <!--Модуль прев нехт-->
  <div>
	  <table style="width: 100%; border-collapse: collapse;">
		<tr>
	  <?php if ($prev_text) { ?>
		  <td align=left><a href="<?php echo $prev_url; ?>" class="button"><span><?php echo $prev_text;  ?></span></a></td>
      <?php } ?>
	  <?php if ($next_text) { ?>
		<td align=right><a href="<?php echo $next_url; ?>" class="button"><span><?php echo $next_text;?></span></a></td>
      <?php } ?>
		</tr>
	  </table>
	</div>
	
	                              <?php if(isset($_GET['dev'])){    ?>   
											<!--<a id="print" target="_blank" href=""><img src="/zakaz.png"/></a>-->
											
											
						
											<div id="par1" style="background-color: #FFFFFF; border: 2px dashed #000000; display: none; height: 500px; left: 30%; padding: 20px; position: fixed; top: 20%; width: 700px; z-index: 2000"></div>
											<div id="par2" style="background-color: #FFFFFF; border: 2px dashed #000000; display: none; height: 500px; left: 30%; padding: 20px; position: fixed; top: 20%; width: 700px; z-index: 2000"></div>
											<div id="par3" style="background-color: #FFFFFF; border: 2px dashed #000000; display: none; height: 500px; left: 30%; padding: 20px; position: fixed; top: 20%; width: 700px; z-index: 2000"></div>
											
											
											<div id ="optbar"></div>
								  <?php  }   ?>			
  
  <div class="product-info">
    <?php if ($thumb || $images) { ?>
    <div class="left">
      <?php if ($thumb) { ?>
      <div id="p-img" class="image"><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox" rel="colorbox"><img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" /></a></div>
      <?php } ?>
      <?php if ($images) { ?>
      <div class="image-additional">
        <?php foreach ($images as $image) { ?>
        <a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="colorbox" rel="colorbox"><img src="<?php echo $image['thumb']; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a>
        <?php } ?>
      </div>
      <?php } ?>
    </div>
    <?php } ?>
    
    <!--<div id="printblock" style="visibility: hidden">
		<a id="print" href="" target="_blank">ПЕЧАТЬ</a>
    </div>-->
    
    <div class="right">
   
       
      <!--div class="description">
        <?php if ($manufacturer) { ?>
        <span><?php echo $text_manufacturer; ?></span> <a href="<?php echo $manufacturers; ?>"><?php echo $manufacturer; ?></a><br />
        <?php } ?>
        <span><?php echo $text_model; ?></span> <?php echo $model; ?><br />
        <?php if ($reward) { ?>
        <span><?php echo $text_reward; ?></span> <?php echo $reward; ?><br />
        <?php } ?>
        <span><?php echo $text_stock; ?></span> <?php echo $stock; ?>
</div-->
      <?php if ($price) { ?>
      <div class="price"><?php echo $text_price; ?>
        <?php if (!$special || $special == '1 рублей') { ?>
        <?php echo number_format( $price, 0, ',', ' ' ); ?>  рублей
        <?php } else { ?>
        <span class="price-old"><?php echo $price; ?></span> <span class="price-new"><?php echo $special; ?></span>
        <?php } ?>
        <br />
        <?php if ($tax) { ?>
        <!--span class="price-tax"><?php echo $text_tax; ?> <?php echo $tax; ?></span--><br />
        <?php } ?>
      
      
      
      
        <?php if ($points) { ?>
        <span class="reward"><small><?php echo $text_points; ?> <?php echo $points; ?></small></span><br />
        <?php } ?>
        <?php if ($discounts) { ?>
         
        <br />
        
        
        
        <div class="discount">
          <?php foreach ($discounts as $discount) { ?>
          <?php echo sprintf($text_discount, $discount['quantity'], $discount['price']); ?><br />
          <?php } ?>
        </div>
        <?php } ?>
        <div style="font-size:14px;" id="desc">
		<div style="float:left; width: 800px">
					<?php echo $description; ?>
			 
			    </div>
	    <div style="float:left; width: 300px">
										<?php if ($options) { ?>
								<div class="options">
								  <?php if(isset($_GET['dev'])){    ?>   
											<a id="print" target="_blank" href=""><img src="/zakaz.png"/></a>
								  <?php } ?>	
								<h2>Дополнительные опции Заказа</h2>
															
	                             <?php if(isset($_GET['dev'])){    ?>   
										<!--
										<input id="but1" type="button" value="Подобрать мотор"/></br></br>
										<input id="but2" type="button" value="Подобрать мотор 2"/></br></br>
										<input id="but3" type="button" value="Подобрать мотор 3"/></br></br>
								        -->
								        <h2>Выбрать мотор:</h2>
								        <img id="but1" src="/icons/yam.jpg" />
								        <img id="but2" src="/icons/suz.jpg" />
								        <img id="but3" src="/icons/mer.jpg" />
								<?php } ?>
	                              
								
								<?php foreach ($options as $option) { ?>
								<?php if ($option['type'] == 'select') { ?>
								<div id="option-<?php echo $option['product_option_id']; ?>" class="option">
								  <?php if ($option['required']) { ?>
								  <span class="required">*</span>
								  <?php } ?>
								  <b><?php echo $option['name']; ?>:</b><br />
								  <select name="option[<?php echo $option['product_option_id']; ?>]">
									<option value=""><?php echo $text_select; ?></option>
									<?php foreach ($option['option_value'] as $option_value) { ?>
									<option value="<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?>
									<?php if ($option_value['price']) { ?>
									(<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
									<?php } ?>
									</option>
									<?php } ?>
								  </select>
								</div>
								<br />
								<?php } ?>
								<?php if ($option['type'] == 'radio') { ?>
								<div id="option-<?php echo $option['product_option_id']; ?>" class="option">
								  <?php if ($option['required']) { ?>
								  <span class="required">*</span>
								  <?php } ?>
								  <b><?php echo $option['name']; ?>:</b><br />
								  <?php foreach ($option['option_value'] as $option_value) { ?>
								  <input type="radio" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" />
								  <label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?>
									<?php if ($option_value['price']) { ?>
									(<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
									<?php } ?>
								  </label>
								  <br />
								  <?php } ?>
								</div>
								<br />
								<?php } ?>
								<?php if ($option['type'] == 'checkbox') { ?>
								<div id="option-<?php echo $option['product_option_id']; ?>" class="option">
								  <?php if ($option['required']) { ?>
								  <span class="required">*</span>
								  <?php } ?>
								  <b><?php echo $option['name']; ?>:</b><br />
								  <?php foreach ($option['option_value'] as $option_value) { ?>
								  <input type="checkbox" name="option[<?php echo $option['product_option_id']; ?>][]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" />
								  <label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?>
									<?php if ($option_value['price']) { ?>
									(<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
									<?php } ?>
								  </label>
								  <br />
								  <?php } ?>
								</div>
								<br />
								<?php } ?>
								<?php if ($option['type'] == 'image') { ?>
								<div id="option-<?php echo $option['product_option_id']; ?>" class="option">
								  <?php if ($option['required']) { ?>
								  <span class="required">*</span>
								  <?php } ?>
								  <b><?php echo $option['name']; ?>:</b><br />
								  <table class="option-image">
									<?php foreach ($option['option_value'] as $option_value) { ?>
									<tr>
									  <td style="width: 1px;"><input type="radio" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" /></td>
									  <td><label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><img src="<?php echo $option_value['image']; ?>" alt="<?php echo $option_value['name'] . ($option_value['price'] ? ' ' . $option_value['price_prefix'] . $option_value['price'] : ''); ?>" /></label></td>
									  <td><label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?>
										  <?php if ($option_value['price']) { ?>
										  (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
										  <?php } ?>
										</label></td>
									</tr>
									<?php } ?>
								  </table>
								</div>
								<br />
								<?php } ?>
								<?php if ($option['type'] == 'text') { ?>
								<div id="option-<?php echo $option['product_option_id']; ?>" class="option">
								  <?php if ($option['required']) { ?>
								  <span class="required">*</span>
								  <?php } ?>
								  <b><?php echo $option['name']; ?>:</b><br />
								  <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" />
								</div>
								<br />
								<?php } ?>
								<?php if ($option['type'] == 'textarea') { ?>
								<div id="option-<?php echo $option['product_option_id']; ?>" class="option">
								  <?php if ($option['required']) { ?>
								  <span class="required">*</span>
								  <?php } ?>
								  <b><?php echo $option['name']; ?>:</b><br />
								  <textarea name="option[<?php echo $option['product_option_id']; ?>]" cols="40" rows="5"><?php echo $option['option_value']; ?></textarea>
								</div>
								<br />
								<?php } ?>
								<?php if ($option['type'] == 'file') { ?>
								<div id="option-<?php echo $option['product_option_id']; ?>" class="option">
								  <?php if ($option['required']) { ?>
								  <span class="required">*</span>
								  <?php } ?>
								  <b><?php echo $option['name']; ?>:</b><br />
								  <input type="button" value="<?php echo $button_upload; ?>" id="button-option-<?php echo $option['product_option_id']; ?>" class="button">
								  <input type="hidden" name="option[<?php echo $option['product_option_id']; ?>]" value="" />
								</div>
								<br />
								<?php } ?>
								<?php if ($option['type'] == 'date') { ?>
								<div id="option-<?php echo $option['product_option_id']; ?>" class="option">
								  <?php if ($option['required']) { ?>
								  <span class="required">*</span>
								  <?php } ?>
								  <b><?php echo $option['name']; ?>:</b><br />
								  <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="date" />
								</div>
								<br />
								<?php } ?>
								<?php if ($option['type'] == 'datetime') { ?>
								<div id="option-<?php echo $option['product_option_id']; ?>" class="option">
								  <?php if ($option['required']) { ?>
								  <span class="required">*</span>
								  <?php } ?>
								  <b><?php echo $option['name']; ?>:</b><br />
								  <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="datetime" />
								</div>
								<br />
								<?php } ?>
								<?php if ($option['type'] == 'time') { ?>
								<div id="option-<?php echo $option['product_option_id']; ?>" class="option">
								  <?php if ($option['required']) { ?>
								  <span class="required">*</span>
								  <?php } ?>
								  <b><?php echo $option['name']; ?>:</b><br />
								  <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="time" />
								</div>
								<br />
								<?php } ?>
								<?php } ?>
							  </div>
							  <?php } ?>
			  </div>
	</div>
        
        
      </div>
      <?php } ?>
      
      
      
      
<div>
<table class="attribute" style="width:400px;">
      <?php foreach ($attribute_groups as $attribute_group) { ?>
      <thead>
        <tr>
          <td colspan="2"><?php echo $attribute_group['name']; ?></td>
        </tr>
      </thead>
      <tbody>
        <?php foreach ($attribute_group['attribute'] as $attribute) { ?>
        <tr>
          <td align="right"><?php echo $attribute['name']; ?></td>
          <td align="left"><?php echo $attribute['text']; ?></td>
        </tr>
        <?php } ?>
      </tbody>
      <?php } ?>
    </table>
</div>
      <!--<div class="cart">
        <div><?php echo $text_qty; ?>
          <input type="text" name="quantity" size="2" value="<?php echo $minimum; ?>" />
          <input type="hidden" name="product_id" size="2" value="<?php echo $product_id; ?>" />
          &nbsp;
          <input type="button" value="<?php echo $button_cart; ?>" id="button-cart" class="button" />
        </div>
        <div><span>&nbsp;&nbsp;&nbsp;<?php echo $text_or; ?>&nbsp;&nbsp;&nbsp;</span></div>
        <div><a onclick="addToWishList('<?php echo $product_id; ?>');"><?php echo $button_wishlist; ?></a><br />
          <a onclick="addToCompare('<?php echo $product_id; ?>');"><?php echo $button_compare; ?></a></div>
        <?php if ($minimum > 1) { ?>
        <div class="minimum"><?php echo $text_minimum; ?></div>
        <?php } ?>
      </div>-->
      <?php if ($review_status) { ?>
      <div class="review">
        <div><img src="catalog/view/theme/default/image/stars-<?php echo $rating; ?>.png" alt="<?php echo $reviews; ?>" />&nbsp;&nbsp;<a onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $reviews; ?></a>&nbsp;&nbsp;|&nbsp;&nbsp;<a onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $text_write; ?></a></div>
        <div class="share"><!-- AddThis Button BEGIN -->
          <div class="addthis_default_style"><a class="addthis_button_compact"><?php echo $text_share; ?></a> <a class="addthis_button_email"></a><a class="addthis_button_print"></a> <a class="addthis_button_facebook"></a> <a class="addthis_button_twitter"></a></div>
          <script type="text/javascript" src="//s7.addthis.com/js/250/addthis_widget.js"></script> 
          <!-- AddThis Button END --> 
        </div>
      </div-->
      <?php } ?>
    </div>
  </div>
  
  
  <?php if ($products) { ?>
  <div id="tab-related" class="tab-content">
    <div class="box-product">
      <?php foreach ($products as $product) { ?>
      <div>
        <?php if ($product['thumb']) { ?>
        <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div>
        <?php } ?>
        <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>
        <?php if ($product['price']) { ?>
        <div class="price">
          <?php if (!$product['special']) { ?>
          <?php echo $product['price']; ?>
          <?php } else { ?>
          <span class="price-old"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span>
          <?php } ?>
        </div>
        <?php } ?>
        <?php if ($product['rating']) { ?>
        <div class="rating"><img src="catalog/view/theme/default/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div>
        <?php } ?>
        <a onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button"><?php echo $button_cart; ?></a></div>
      <?php } ?>
    </div>
  </div>
  <?php } ?>
  <?php if ($tags) { ?>
  <div class="tags"><b><?php echo $text_tags; ?></b>
    <?php for ($i = 0; $i < count($tags); $i++) { ?>
    <?php if ($i < (count($tags) - 1)) { ?>
    <a href="<?php echo $tags[$i]['href']; ?>"><?php echo $tags[$i]['tag']; ?></a>,
    <?php } else { ?>
    <a href="<?php echo $tags[$i]['href']; ?>"><?php echo $tags[$i]['tag']; ?></a>
    <?php } ?>
    <?php } ?>
  </div>
  <?php } ?>
  <?php echo $content_bottom; ?></div>
<script type="text/javascript"><!--
$('.colorbox').colorbox({
	overlayClose: true,
	opacity: 0.5
});
//--></script> 
<script type="text/javascript"><!--
$('#button-cart').bind('click', function() {
	$.ajax({
		url: 'index.php?route=checkout/cart/add',
		type: 'post',
		data: $('.product-info input[type=\'text\'], .product-info input[type=\'hidden\'], .product-info input[type=\'radio\']:checked, .product-info input[type=\'checkbox\']:checked, .product-info select, .product-info textarea'),
		dataType: 'json',
		success: function(json) {
			$('.success, .warning, .attention, information, .error').remove();
			
			if (json['error']) {
				if (json['error']['option']) {
					for (i in json['error']['option']) {
						$('#option-' + i).after('<span class="error">' + json['error']['option'][i] + '</span>');
					}
				}
			} 
			
			if (json['success']) {
				$('#notification').html('<div class="success" style="display: none;">' + json['success'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>');
					
				$('.success').fadeIn('slow');
					
				$('#cart-total').html(json['total']);
				
				$('html, body').animate({ scrollTop: 0 }, 'slow'); 
			}	
		}
	});
});
//--></script>
<?php if ($options) { ?>
<script type="text/javascript" src="catalog/view/javascript/jquery/ajaxupload.js"></script>
<?php foreach ($options as $option) { ?>
<?php if ($option['type'] == 'file') { ?>
<script type="text/javascript"><!--
new AjaxUpload('#button-option-<?php echo $option['product_option_id']; ?>', {
	action: 'index.php?route=product/product/upload',
	name: 'file',
	autoSubmit: true,
	responseType: 'json',
	onSubmit: function(file, extension) {
		$('#button-option-<?php echo $option['product_option_id']; ?>').after('<img src="catalog/view/theme/default/image/loading.gif" class="loading" style="padding-left: 5px;" />');
		$('#button-option-<?php echo $option['product_option_id']; ?>').attr('disabled', true);
	},
	onComplete: function(file, json) {
		$('#button-option-<?php echo $option['product_option_id']; ?>').attr('disabled', false);
		
		$('.error').remove();
		
		if (json['success']) {
			alert(json['success']);
			
			$('input[name=\'option[<?php echo $option['product_option_id']; ?>]\']').attr('value', json['file']);
		}
		
		if (json['error']) {
			$('#option-<?php echo $option['product_option_id']; ?>').after('<span class="error">' + json['error'] + '</span>');
		}
		
		$('.loading').remove();	
	}
});
//--></script>
<?php } ?>
<?php } ?>
<?php } ?>
<script type="text/javascript"><!--
$('#review .pagination a').live('click', function() {
	$('#review').fadeOut('slow');
		
	$('#review').load(this.href);
	
	$('#review').fadeIn('slow');
	
	return false;
});			

$('#review').load('index.php?route=product/product/review&product_id=<?php echo $product_id; ?>');

$('#button-review').bind('click', function() {
	$.ajax({
		url: 'index.php?route=product/product/write&product_id=<?php echo $product_id; ?>',
		type: 'post',
		dataType: 'json',
		data: 'name=' + encodeURIComponent($('input[name=\'name\']').val()) + '&text=' + encodeURIComponent($('textarea[name=\'text\']').val()) + '&rating=' + encodeURIComponent($('input[name=\'rating\']:checked').val() ? $('input[name=\'rating\']:checked').val() : '') + '&captcha=' + encodeURIComponent($('input[name=\'captcha\']').val()),
		beforeSend: function() {
			$('.success, .warning').remove();
			$('#button-review').attr('disabled', true);
			$('#review-title').after('<div class="attention"><img src="catalog/view/theme/default/image/loading.gif" alt="" /> <?php echo $text_wait; ?></div>');
		},
		complete: function() {
			$('#button-review').attr('disabled', false);
			$('.attention').remove();
		},
		success: function(data) {
			if (data['error']) {
				$('#review-title').after('<div class="warning">' + data['error'] + '</div>');
			}
			
			if (data['success']) {
				$('#review-title').after('<div class="success">' + data['success'] + '</div>');
								
				$('input[name=\'name\']').val('');
				$('textarea[name=\'text\']').val('');
				$('input[name=\'rating\']:checked').attr('checked', '');
				$('input[name=\'captcha\']').val('');
			}
		}
	});
});
//--></script> 
<script type="text/javascript"><!--
$('#tabs a').tabs();
//--></script> 
<script type="text/javascript" src="catalog/view/javascript/jquery/ui/jquery-ui-timepicker-addon.js"></script> 
<script type="text/javascript"><!--
if ($.browser.msie && $.browser.version == 6) {
	$('.date, .datetime, .time').bgIframe();
}

$('.date').datepicker({dateFormat: 'yy-mm-dd'});
$('.datetime').datetimepicker({
	dateFormat: 'yy-mm-dd',
	timeFormat: 'h:m'
});
$('.time').timepicker({timeFormat: 'h:m'});
//--></script> 
<?php echo $footer; ?>

<script>
	var ch_text = "";
	var ra_text = "";
	var tit_text = "";
	var price_text = "";
	titlePrice(); 
    //Получение выбранных опций
    $('input:radio').click(function(){
		var bat = $("input:radio:checked");
		render(bat.get(), 1);
	});
	$('input:checkbox').click(function(){
		var bat = $("input:checkbox:checked");
		render(bat.get(), 2);
	});
	
	function render(a, b){
			var text;
			if(b == 1){ch_text = "";}else{ra_text = "";};
			for(var i=0; i < a.length; i++){
				text = $("label[for='"+a[i].id+"']").html();
				if(b == 1){
					ch_text = ch_text + removeBr(text);
				}else{
					ra_text = ra_text + removeBr(text);
				};
					
			}
			$('#optbar').html(ch_text + ra_text);
			//var str = removeWhitespaces(ch_text) + removeWhitespaces(ra_text);
			var str = ch_text + ra_text;
			var len = $('#lenght').html();
			$('#print').attr('href', 'print.php?data='+ str + "&title=" + tit_text + "&price=" + price_text + "&len=" + len);
	}
	
	//Ждем нажатие кнопки, чтобы отобразить окно моторов
	$(document).ready(function(){
		$("#but1").click(function(){
			$("#par1").css("display","block");
	   	});
	   	$("#but2").click(function(){
			$("#par2").css("display","block");
	   	});
	   	$("#but3").click(function(){
			$("#par3").css("display","block");
	   	})
    });     
	//Ждем загрузки страницы, получаем данные по моторам
	$(window).load(function(){
		var str = removeWhitespaces(ch_text) + removeWhitespaces(ra_text);  
		$("#par1").load("inn.php","data=" + str + '&ln=' + $('#lenght').html() + '&vd=1');
		$("#par2").load("inn.php","data=" + str + '&ln=' + $('#lenght').html() + '&vd=2');
		$("#par3").load("inn.php","data=" + str + '&ln=' + $('#lenght').html() + '&vd=3');
		$('#print').attr('href', 'print.php?title=' + tit_text + "&price=" + price_text);
	});



function removeWhitespaces(str){
		var res = str.replace(/\s/g, "");
		return res;
}
function removeBr(str){
		var res = str.trim() + ":";
		return res;
}

function titlePrice(){
		tit_text = $("h1").html();
		if($(".price-new").length){
			price_text = $(".price-new").html();
		}else{
			var text = $(".price").html();
			text = text.split('<br>');
			price_text = removeWhitespaces(text[0]);
			//alert(price_text);
			
		}
}

function prr(){
	var bat = $("input:checkbox:checked");
	render(bat.get(), 2);
}

function butClose(){
	$("#par1").css("display","none");
	$("#par2").css("display","none");
	$("#par3").css("display","none");
}
</script>
